diff options
Diffstat (limited to 'pages/api/notes/[id].js')
-rw-r--r-- | pages/api/notes/[id].js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pages/api/notes/[id].js b/pages/api/notes/[id].js index a2cd680..5099f4f 100644 --- a/pages/api/notes/[id].js +++ b/pages/api/notes/[id].js @@ -54,7 +54,7 @@ export default withSession(async (req, res) => { try { const session = await conn.startSession() const user = req.session.get('user') - const { title, noteId, content } = req.body + const { title, noteId, content } = JSON.parse(req.body) if (!user || !user?.isVerified || !_id || !content) { throw new Error('Something went wrong') |